package com.example.service;

import com.example.Mapper.musicListMapper;
import com.example.pojo.Musiclist;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public class musicListImp implements musicList {
    @Autowired
    private musicListMapper m1;
    @Autowired
    private musicListMapper addMusic;
    @Override
    public List<Musiclist> getlist() {
        List<Musiclist> list = m1.getmusicList();
        return list;
    }

    @Override
    public String addMusic(String Musicer,String MusicName,String MusicUrl) {
        int i = addMusic.addMusic(Musicer,MusicName,MusicUrl);
        String s="";
        if(i>0){
            s="插入成功";
        }
        return s;
    }

    @Override
    public List<Musiclist> selectByName(String MusicName) {
        List<Musiclist> list = addMusic.selectByName(MusicName);
        return list;
    }
}
